cmake_minimum_required(VERSION 2.8.3)
project(mower_msgs_test)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 
set(CMAKE_BUILD_TYPE "Debug")

find_package(catkin REQUIRED COMPONENTS
  roscpp  
  std_msgs
  message_generation  
  geometry_msgs
  mower_msgs
  actionlib
  actionlib_msgs
)
 

# add_message_files(
#    FILES
#    com_frame.msg
#    logic_bluetooth_connect_select.msg
  
# )

# generate_messages(DEPENDENCIES
#   std_msgs
# )

# add_action_files(
#   DIRECTORY action
#   FILES
#   state_ctl.action
# )


# generate_messages(DEPENDENCIES
#   std_msgs
#   actionlib_msgs
# )


catkin_package(
  CATKIN_DEPENDS message_runtime mower_msgs
  INCLUDE_DIRS include
  LIBRARIES mower_msgs_test
)



include_directories(
  include
  ${catkin_INCLUDE_DIRS}  
)


add_library(mower_msgs_test     
    src/mower_msgs_test.cpp         
)
add_dependencies(mower_msgs_test  ${PROJECT_NAME}  mower_msgs   ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(mower_msgs_test ${catkin_LIBRARIES})


add_executable(mower_msgs_test_node 
      src/mower_msgs_test.cpp          
      )
target_link_libraries(mower_msgs_test_node ${catkin_LIBRARIES})



#############
## Install ##
#############
 
install(TARGETS mower_msgs_test_node
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
## FILES_MATCHING PATTERN "*.h"
## PATTERN ".svn" EXCLUDE
)

install(FILES   launch/mower_msgs_test.launch
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)






